#ifndef USART_TRANSPORT_H_
#define USART_TRANSPORT_H_

#include "transport.h"

class USART_transport : public Transport {
public:
    USART_transport(unsigned char num, unsigned long buad);
    virtual bool init();
    virtual bool read(unsigned char& ch);
    virtual void write(unsigned char* data, unsigned short len);
    virtual void set_timeout(int t);
    virtual bool is_timeout();
    virtual void set_ready(bool ready_state);
    virtual bool is_ready();
    virtual unsigned char get_trans_num();
private:
    unsigned char usart_num;
    unsigned long usart_buad;
    unsigned int timeout;
    bool ready;
};
#endif
